1. Field of the Invention
The present invention relates to an encoder and a decoder for an image processing system, and more particularly, to a method of encoding/decoding an image frame for a small image display system.
2. Discussion of the Related Art
A traditional motion picture encoder requires a frame memory for storing a current input image frame received from a camera and another frame memory for storing an image frame restored from a previous input image frame. Each frame memory needs to have a memory space of at least 38016 bytes (176×144×1.5) in order to store a single image frame (YUV 4:2:0 Quarter Common Intermediate Format (QCIF)).
On the other hand, the traditional motion picture decoder requires a frame memory for storing an image frame restored from a current input image frame and another frame memory for storing an image frame restored a previous input image frame.
FIG. 1 illustrates a traditional motion picture encoder. First, the frame memory 2 stores an Nth (current) input image frame received from a camera. Thereafter, the subtractor 3 subtracts the motion-compensated frame from the Nth input image frame stored in the frame memory 2 in order to generate a difference signal.
Then the subtracted (difference) signal passes through the Discrete Cosine Transformer (DCT) 4, the quantizer 5, and the variable length encoder (VLE) 6. The data bit stream outputted from the VLE 6 is stored in the output buffer 7. The bit rate controller adaptively controls the quantization parameter (QP) of the quantizer 5 in order to prevent any data overflow or underflow in the output buffer 7.
The data outputted from the quantizer 5 passes through the inverse quantizer 10 and the Inverse Discrete Cosine Transformer (IDCT) to be restored to the difference signal. Thereafter, the adder 12 adds the restored difference signal with the motion-compensated signal in order to restore the Nth (current) input image frame. The restored Nth input image frame is stored in the frame memory 13 and may input to the PIP circuit 17.
FIG. 2 illustrates a traditional motion picture decoder. According to the FIG. 2, the input buffer 22 initially stores an input bit stream. Then, the stored bit stream passes through the variable length decoder (VLD) 23, the inverse quantizer 24, and the Inverse Discrete Cosine Transformer (IDCT) 25 to be restored to the difference signal, which is generated by the subtractor 3 shown in FIG. 1.
The restored (N−1)th input image frame, which is stored in the frame memory 29, is used by the motion-compensator 30 to generate the motion-compensated frame. The adder 26 adds the restored difference signal and the motion-compensated frame to restore the Nth input image frame. Finally, the frame memory 27 stores the restored Nth input image frame, which will be outputted as an output image frame 28.
Each frame memory in the encoder or decoder requires having a memory space of 38016 bytes (176×144×1.5) for a YUV 4:2:0 QCIF image in order to store an image frame.
FIG. 3 illustrates a frame memory 31 that stores the restored (N−1)th input image frame and the memory region (Y component) of a frame memory 32 that stores the restored Nth input image frame. The size of a QCIF image frame is 176 by 144, and each frame can be divided into 9 image slices.
Since the image decoder requires two image frame memories, for decoding a YUV 4:2:0 QCIF image, a total memory space of 76032 (=176×144×1.5×2) bytes are required for decoding a YUV 4:2:0 QCIF image. Similarly, since the image encoder needs three image frame memories, it requires a total memory space of 114048 (=176×144×1.5×3) bytes for encoding the same. In addition, for a YUV 4:2:0 CIF image, the decoder needs a total memory space of 304128 (=352×288×1.5×2) bytes, and the encoder needs a total memory space of 456192 (=352×288×1.5×3) bytes.
As described above, each frame memory requires a memory space of 38016 bytes for storing a YUV 4:2:0 QCIF image frame. However, a small motion picture system, i.e., a mobile telephone, may not able to afford a memory having a large memory space. Therefore, the image data encoder or decoder of a mobile telephone or any other small image system may require a memory with a smaller memory space.
In addition, it is often necessary to embody the image encoder or decoder in a small chip for the small image system. In this case, each frame memory of such encoder/decoder must be included in the same chip. Therefore, the memory space of the memory device is limited.